package com.dys.common;

import java.io.Serializable;

/**
 * @Author: 疾风
 * @ClassName: ResponseResult
 * @Description: 统一响应结果类封装
 * @CreateDate: 2024/12/16
 * @Version: v1.0.0
 */
public class ResponseResult<T> implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 响应状态码
     */
    private Integer code;
    /**
     * 提示信息
     */
    private String msg;
    /**
     * 响应数据
     */
    private T data;

    public ResponseResult() {
    }

    public ResponseResult(Integer code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public ResponseResult(int value, String s) {
        this.code = value;
        this.msg = s;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
